//
//  YNIMFrameworkTypedef.h
//  YNIMFramework
//
//  Created by 黄旭 on 2021/7/28.
//

#ifndef YNIMFrameworkTypedef_h
#define YNIMFrameworkTypedef_h

@class FMDatabase;

/**HX** 漫游消息拉取类型判别 **/
typedef NS_ENUM(NSUInteger, ReceiptMessageType)
{
    ReceiptMessageType_TwoPeopleChat =1,  //两人会话
    ReceiptMessageType_GroupChat =2,      //群、讨论组会话
    ReceiptMessageType_BroadcastMessage =3//广播消息
};
///当前正在进行的会话的类型0：二人会话 1:群 2：讨论组 3：项目组
typedef NS_ENUM(NSInteger, CurrenChatObjType) {
    CurrenChatObjType_twoPeople = 0,   //二人会话
    CurrenChatObjType_group ,          //群
    CurrenChatObjType_discussion,      //讨论组
    CurrenChatObjType_projectTeam      //项目组
};
typedef NS_ENUM(NSInteger, XMPPConnectType) {
    //断开
    XMPPConnectTypeBreak = 0,
    
    // 正在连接
    XMPPConnectTypeConnecting = 1,
    
    //连接完成
    XMPPConnectTypeFinish,
};
typedef NS_ENUM(NSUInteger, YNUserStateType)
{
    YNUserStateTypeOffline = 0,                     //离线状态
    YNUserStateTypeOnlineWithPC = 1,                //电脑在线状态
    YNUserStateTypeOnlineWithModelPhone = 2,        //手机在线状态
};
typedef NS_ENUM(NSInteger, YNMessageSendState) {
    YNMessageSendStateFailed = 0,    //发送失败状态
    YNMessageSendStateSuccess = 1,   //发送成功状态
    YNMessageSendStateSending = 2,   //发送中状态
    YNMessageSendStateDraft = 3,     //发送状态为未发送, 草稿状态
};
typedef NS_ENUM(NSInteger, YNBubbleMessageMediaType) {
    YNBubbleMessageText = 0,           //纯文本
    YNBubbleMessagePhoto = 1,          //纯图片
    YNBubbleMessageVideo = 2,          //纯视频
    YNBubbleMessageVoice = 3,          //纯音频
    YNBubbleMessageFace = 4,           //纯表情
    YNBubbleMessageLocalPosition = 5,  //纯地理位置
    YNBubbleMessageFile = 6,           //纯文件
    YNBubbleMessageMix = 7,            //各种Media混合
    YNBubbleMessageLive = 8            //直播相关
};
typedef NS_ENUM(NSInteger, YNBubbleMessageType) {
    YNBubbleMessageTypeSending = 0, //发送
    YNBubbleMessageTypeReceiving    //接收
};
typedef NS_ENUM(NSInteger, YNBubbleMessageChatType) {
    YNBubbleMessageChatTypeWeChat = 1,        //两人会话
    YNBubbleMessageChatTypeGroupChat = 2,     //多人群会话
    YNBubbleMessageChatTypeDiscussion = 3,    //讨论组会话
    YNBubbleMessageChatTypeBroadcast = 4,     //广播
    YNBubbleMessageChatTypeNotification = 5,  //通知
    YNBubbleMessageChatTypeWeChatVoice=15,   //两人会话语音
    YNBubbleMessageChatTypeGroupChatVoice = 25,    //群会话语音
    YNBubbleMessageChatTypeDiscussionVoice=35,    //讨论组会话语音
    YNBubbleMessageChatTypeDocumentsSent=16,   /**HX** 二人会话在线文件发送，当识别到这种消息现在是直接过略掉 **/
    YNBubbleMessageChatTypeFileWeChat = 12,   //两人会话接收对于文件状态的处理
    YNBubbleMessageChatTypeAutoReplyOnPC = 13, /**HX** 二人会话PC端自动回复的消息 **/
    YNBubbleMessageChatTypeLive=45, /**HX** 直播消息 **/
    YNBubbleMessageChatTypeMeetingGroupChat = 101,   //视频会议直播间消息（smesis上这个被注释为：会议组会话）
    /**HX** 本地自加消息类型，服务器没有加，只和安卓约定好的 **/
    YNBubbleMessageChatTypeProjectTeamChat = 100,   //项目组会话
    YNBubbleMessageChatTypeProjectTeamVoice = 145,   //项目组会话语音
    /**HX** 消息通知改版后，本地自加消息类型，服务器没有加，主要用于最近会话列表相关逻辑判断 **/
    YNBubbleMessageChatTypeNoticeAnnouncement = 146,  //通知公告
    YNBubbleMessageChatTypeSystemMessage = 147,  //系统消息
};
//广播消息的类型
typedef NS_ENUM(NSInteger, YNBroadcastNotificationType) {
    YNBroadcastNotificationTypeNotification = 0,   //通知(告知)类
    YNBroadcastNotificationTypeAbnormal = 1,       //异常类
    YNBroadcastNotificationTypeWaiting = 2,        //待办
    YNBroadcastNotificationTypeAll = 3,        //全部事件
};
//广播消息的来源终端
typedef NS_ENUM(NSInteger, YNBroadcastNotificationSourceTerminal) {
    YNBroadcastNotificationSourceTerminalYNedut =  0,                   //YNedut8
    YNBroadcastNotificationSourceTerminalEnterpriseInformation = 1,     //企业信息化
};
/**HX** 现只针对群、讨论组的消息要区分数据来源 **/
typedef NS_ENUM(NSUInteger, GroupMessageSourceType)
{
    GroupMessageSourceType_online =0,//在线接收到的消息
    GroupMessageSourceType_Roaming //通过拉取漫游获取的
};
//文件状态
typedef NS_ENUM(NSInteger, fileState)
{
    fileStateNotDownload = 1,    //文件未下载
    fileStateDownloaded = 2,     //文件已下载
    fileStateDownloading = 3,    //文件下载中
    fileStateDownloadFail = 4,   //下载失败
    fileStateUploaded = 5,       //已发送
    fileStateUploadFail = 6,     //发送失败
    fileStateUploading = 7,      //发送中
    fileStateDownloadFileError=8 , //文件错误
};
//语音状态
typedef NS_ENUM(NSInteger, voiceState)
{
    voiceStateNotDownload = 1,    //语音未下载
    voiceStateDownloaded = 2,     //语音已下载
    voiceStateDownloading = 3,    //语音下载中
    voiceStateDownloadFail = 4,   //语音失败
    voiceStateUploaded = 5,       //已发送
    voiceStateUploadFail = 6,     //发送失败
    voiceStateUploading = 7,      //发送中
};
typedef NS_ENUM(NSInteger,OrgType) {
    AllOrgType, //所有组织机构
    contactOrgType,//联系人组织机构
    organizationOrgType //组织机构中的组织机构
};
typedef void(^uploadChatFileResultBlock)(bool success,NSString* fileId);
typedef void(^uploadChatFileBlock)(NSString*userNo,NSString*fileId,NSString*userType,NSURL*fileURL,NSString*fileName,uploadChatFileResultBlock block);

#endif /* YNIMFrameworkTypedef_h */
